﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BXH.Movie
{
    public partial class FrmMain : Form
    {
        public static FrmMain _FrmMain;
        public FrmMain()
        {
            InitializeComponent();
            _FrmMain = this;
        }
        //查看电影信息
        private void btnCheckMovieInfo_Click(object sender, EventArgs e)
        {
            Forms.UCMovieMain movieinfo = new Forms.UCMovieMain();
            this.SetManage(movieinfo);
        }
        //个人信息管理
        private void btnInformationManager_Click(object sender, EventArgs e)
        {
            Forms.InformationManager info = new Forms.InformationManager();
            this.SetManage(info);
        }
        //影评管理
        private void btnCinecismManagement_Click_1(object sender, EventArgs e)
        {
            Forms.CinecismManagement cinecism = new Forms.CinecismManagement();
            this.SetManage(cinecism);
        }
        //选座购票
        private void btnSeatManager_Click_1(object sender, EventArgs e)
        {
            Forms.UCSeatManager seat = new Forms.UCSeatManager();
            this.SetManage(seat);
        }

        //订单管理
        private void btnOrderManager_Click_1(object sender, EventArgs e)
        {
            Forms.UCOrderManager order = new Forms.UCOrderManager();
            this.SetManage(order);
        }

        //
        public void SetManage(Control control)
        {
            this.splitContainer1.Panel2.Controls.Clear();
            this.splitContainer1.Panel2.Controls.Add(control);
            this.splitContainer1.Panel2.Controls[0].Dock = DockStyle.Fill;
        }

        public void SetManageOther(Control control)
        {
            this.splitContainer1.Panel2.Controls.Clear();
            this.splitContainer1.Panel2.Controls.Add(control);
            this.splitContainer1.Panel2.Controls[0].Location = new Point((this.splitContainer1.Panel2.Width - control.Width)/2,(this.splitContainer1.Panel2.Height - control.Height) /2);
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {

        }
    }
}
